/* $Id mootools2jquery.js v1.0 08 Mar 2010 thanhnv Exp*/

/* @desc: convert source code from mootools to jquery (Using Search Engine of Dream Weaver)*/

/** 
 * 1: selector Id: 
 * mode: regex replace
 * find: ([^\$]{1}\${1}\(['"]{1})
 * replace with: $1#
*/


/** 
 * 2: selector multi element by class: 
 * mode: regex replace
 * find: \${2}(\(['"]{1}[\.]{1})
 * replace with: $$1
*/


/** 
 * 3: selector multi element by tag name: 
 * mode: regex replace
 * find: \${2}(\(['"]{1}[^\.'"]+)
 * replace with: $$1
*/


/** 
 * 4: set styles: 
 * mode: regex replace
 * find: \.\s*setStyles\s*\(
 * replace with: .css(
*/

/** 
 * 5: set style: 
 * mode: regex replace
 * find: \.\s*setStyles\s*\(
 * replace with: .css(
*/

/** 
 * 6: position top: 
 * mode: regex replace
 * find: \.\s*getCoordinates\s*\(\s*\)\s*\.top
 * replace with: .position().top
*/

/** 
 * 7: get height: 
 * mode: regex replace
 * find: \.\s*getCoordinates\s*\(\s*\)\s*\.height
 * replace with: .height()
*/

/** 
 * 8: add events (except window event): 
 * mode: regex replace
 * find: \.\s*addEvent\s*\(\s*['"]{1}(blur|change|click|dblclick|focus|focusin|focusout|hover|keydown|keypress|keyup|load|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|submit|unload)['"]{1}\s*,
 * replace with: .$1(
*/

/** 
 * 9: bind event: 
 * mode: regex replace
 * find: \.\s*(blur|change|click|dblclick|focus|focusin|focusout|hover|keydown|keypress|keyup|load|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|submit|unload)+\s*\(\s*(function.*?\{[\s\S]*?\})\s*\.\s*bind\s*\(\s*this\s*\)\s*\)
 * replace with: .$1(
*/

/** 
 * 10: effects: 
 * Note: find and manual replace
*/

/** 
 * 11: methods define: 
 * mode: regex replace
 * find: ([a-zA-Z0-9_]+)\s*:\s*function\s*\(
 * replace with: function $1(
*/

/** 
 * 12: methods define continue: 
 * fix end of function
 * mode: regex replace
 * find: },[\r\n]+
 * replace with: };
*/

